home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr10 / 184_01.zip / V200.L < prev    next >
Text File  |  1993-06-13  |  2KB  |  71 lines

  1. /* Visual 200 terminal specific routines */
  2.  
  3. /* Hardware specific module for YANC10.C */
  4. /* Based on H19BD.C by Ken Presser */
  5. /* Current C dialect...BDS-C from BD Software */
  6.  
  7. gotoxy(x,y)
  8. /* position cursor at line y column x */
  9. char x,y;
  10. {
  11.     putchar(ESC);
  12.     putchar('Y');
  13.     putchar(y+32);
  14.     putchar(x+32);
  15. }
  16. getxy(x,y)
  17. /* get the current cursor line and column */
  18. char *x,*y;
  19. {
  20.     putchar(ESC);
  21.     putchar('r');
  22.     while ((*y=bdos(6,255)) == 0) ;
  23.     while ((*x=bdos(6,255)) == 0) ;
  24.     *y -= 32;
  25.     *x -= 32;
  26. }
  27. clear()
  28. /* clear the screen and home cursor */
  29. {
  30.     putchar(ESC);
  31.     putchar('v');
  32. }
  33. delline()
  34. /* delete the line the cursor is on and move it to far left */
  35. {
  36.     putchar(CR);
  37.     deol();
  38. }
  39. deol()
  40. /* delete to end of line */
  41. {
  42.     putchar(ESC);
  43.     putchar('x');
  44. }
  45. revvid()
  46. /* enter background video mode */
  47. {
  48.     putchar(ESC);
  49.     putchar('4');
  50. }
  51. norvid()
  52. /* enter foreground (normal) video mode */
  53. {
  54.     putchar(ESC);
  55.     putchar('3');
  56. }
  57. hinchar()
  58. /* input characters and translate the heath ESC sequences *
  59.  * into one character as character + 128                  */
  60. {
  61.     char c;
  62.  
  63.     while ((c = bdos(6,255)) == 0) /* do nothing */ ;
  64.     if (c == ESC) {
  65.               while ((c=bdos(6,255))==0);
  66.               return(c+128);
  67.                       }
  68.     else    return(c);
  69. }
  70. /* #endif */
  71.